
cd ".\do\raw\timetowork"

use  time_to_work_ipums, clear

keep if statefip==6
keep if countyfip==37
keep if empstat==1
keep if labforce==2
keep if tranwork>10 & tranwork<31

g round_arrive=floor(arrives/15)*15
g round_depart=floor(departs/15)*15

twoway (kdensity round_depart if round_depart > 459 & round_depart< 930, ///
		bw(50) lc(black) lp(dash)) ///
	(kdensity round_arrive if round_arrive > 459 & round_arrive< 930, ///
		bw(50) lc(gray) lp(solid) lw(medthick)),  plotregion(style(none)) ///
	xlabel(500 "5a.m." 600 "6a.m." 700 "7a.m." 800 "8a.m." 900 "9a.m.") title("") xtitle("") ///
	legend(label(1 "Departures") label(2 "Arrivals") region(lwidth(none))) 

graph export ".\results\maintablefigs\figs\timetowork.png, replace
